#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 1010, M = 5010;
const int mod = 998244353;

LL n, m, k;
LL f[N][M];
LL sum[M], rsum[M];

/*
收获：注意边界问题，例如本题，当k=0时，会出现重复加的情况，需要仔细考虑
*/

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n >> m >> k;

    for(int i = 1; i <= m; i ++){
        f[1][i] = 1;
    }

    for(int i = 1; i <= m; i ++){
        sum[i] = ((LL)sum[i - 1] + f[1][i]) % mod;
    }

    for(int i = m; i >= 1; i --){
        rsum[i] = ((LL)rsum[i + 1] + f[1][i]) % mod;
    }

    for(int i = 2; i <= n; i ++){
        for(int j = 1; j <= m; j ++){
            if(j - k >= 1){
                f[i][j] = ((LL)f[i][j] + sum[j - k]) % mod;
            }

            if(j + k <= m){
                f[i][j] = ((LL)f[i][j] + rsum[j + k]) % mod;
            }

            if(k == 0){
                f[i][j] = (f[i][j] - f[i - 1][j] + mod) % mod;
            }
        }

        for(int j = 1; j <= m; j ++){
            sum[j] = ((LL)sum[j - 1] + f[i][j]) % mod;
        }

        for(int j = m; j >= 1; j --){
            rsum[j] = ((LL)rsum[j + 1] + f[i][j]) % mod;
        }
    }

    cout << sum[m] << '\n';


    return 0;
}